package cn.pugle.httpcomponent;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * <p> Created by tzp on 2016/12/28.
 */
public class HTTPClientTest {
    public void MultipartTest() {
        //todo
    }

    public void EncodeTestForGet() {
        //todo
    }

    public void EncodeTestForPost() {
        //todo
    }

    /**
     * new URI会对query又特么encode一次，而且encode的方式么。。。他也不考虑我的query是怎么来的
     */
    protected URI toURI(String scheme, String host, int port, String path, String query) {
        URI uri = null;
        try {
            uri = new URI(scheme + "://" + host + ":" + port + path + "?" + query);
//            uri = new URI(scheme, null, host, port, path, query, null);
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        return uri;
    }

    public void proxyTest() {
        //HttpHost proxy = new HttpHost("10.203.10.198",8888);
        //client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
        //todo
    }
}
